package com.dengdai.apputils.activitys;

import android.graphics.drawable.Drawable;
import android.view.View;

import com.dengdai.applibrary.activitys.BaseExpandableListActivity;
import com.dengdai.applibrary.adapter.BaseCommExpandableListAdapter;
import com.dengdai.apputils.adapters.TestExpandableListAdapter;
import com.dengdai.pullrefresh.library.PullToRefreshBase;

import java.util.ArrayList;
import java.util.List;

/**
 * @说明 测试分组列表
 * @作者 LY
 * @时间 16/5/24 10:33
 * @邮箱 2743569843@qq.com
 * @版权 Copyright(c) 2016 LY-版权所有
 * @备注
 */
public class TestExpandableListActivity extends BaseExpandableListActivity {

    @Override
    public PullToRefreshBase.Mode getListViewMode() {
        return PullToRefreshBase.Mode.BOTH;
    }

    @Override
    public void onChildItemClick(Object o, int groupPosition, int childPosition) {

    }

    @Override
    public void onGroupItemClick(Object o, int groupPosition) {

    }

    @Override
    public void loadingData() {
        List<Object> list = new ArrayList<Object>();
        List<List<Object>> listData = new ArrayList<List<Object>>();
        for (int i = 0; i < 4; i++) {
            list.add(new Object());
            List<Object> listDDD = new ArrayList<Object>();
            for (int j = 0; j < 10; j++) {
                listDDD.add(new Object());
            }
            listData.add(listDDD);
        }
        baseCommExpandableListAdapter.setList(list, listData);
        stopRefreshView();
    }

    @Override
    public BaseCommExpandableListAdapter getAdapter() {
        return new TestExpandableListAdapter(TestExpandableListActivity.this);
    }

    @Override
    public View getHeaderView() {
        return null;
    }

    @Override
    public View getFooterView() {
        return null;
    }

    @Override
    public Drawable getGroupIndicator() {
        return null;
    }
}
